package com.ruoyi.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.entity.Carousel;
import com.ruoyi.common.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 0617
 * @version 1.0
 * @package:com.ruoyi.controller
 * @date 2025/8/23 下午3:02
 * @description: TODO
 */
@RestController
@RequestMapping("/api/banner/service")
public class BannerController {

    @Autowired
    private CarouselService carouselService;


    @GetMapping("banner")
    public R<List<Carousel>> getBanner(){
        List<Carousel> carousels = carouselService.listCarousel(null);
        return R.ok(carousels);
    }
}
